package com.ifamily.domain.user;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

@Entity
@Table(name = "user_properties", catalog = "ifamily")
public class UserProperties implements java.io.Serializable {

	private static final long serialVersionUID = -7791971616884739194L;
	
	@GenericGenerator(name = "generator", strategy = "foreign", 
	parameters = @Parameter(name = "property", value = "user"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "ID", unique = true, nullable = false)
	private int id;
	@OneToMany(mappedBy="user_properties")
	private Set<Kid> kids;
	@Column(name = "STATUS", length = 50)
	private String status;
	@Column(name = "AGE")
	private Integer age;
	@Column(name = "COMMENT", length = 100)
	private String comment;
	@Column(name = "PROFILE_PIC_PATH", length = 500)
	private String profilePicPath;

	public UserProperties() {
	}

	public UserProperties(int id) {
		this.id = id;
	}

	public UserProperties(int id,Set<Kid> kids, String status, Integer age,
			String comment, String profilePicPath) {
		this.id = id;
		this.kids = kids;
		this.status = status;
		this.age = age;
		this.comment = comment;
		this.profilePicPath = profilePicPath;
	}

	
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	
	public Integer getAge() {
		return this.age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getProfilePicPath() {
		return this.profilePicPath;
	}

	public void setProfilePicPath(String profilePicPath) {
		this.profilePicPath = profilePicPath;
	}
}
